/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.app.ad.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
* @website https://el-admin.vip
* @description /
* @author HaojieLi
* @date 2021-03-20
**/
@Entity
@Data
@Table(name="app_aduser_x_hotel")
public class AduserXHotel implements Serializable {

    @Id
    @Column(name = "id")
    @ApiModelProperty(value = "数据唯一标识")
    private String id;

    @Column(name = "user_id")
    @ApiModelProperty(value = "广告商用户ID")
    private String userId;

    @Column(name = "hotel_id")
    @ApiModelProperty(value = "酒店ID")
    private String hotelId;

    @Column(name = "hotel_name")
    @ApiModelProperty(value = "酒店名称")
    private String hotelName;

    @Column(name = "hotel_no")
    @ApiModelProperty(value = "酒店编号")
    private String hotelNo;

    @Column(name = "create_user_id")
    @ApiModelProperty(value = "创建人ID")
    private String createUserId;

    @Column(name = "crete_time")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime creteTime;

    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @Column(name = "is_enable")
    @ApiModelProperty(value = "数据状态")
    private Integer isEnable;

    public void copy(AduserXHotel source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}